﻿@model sBlog.Net.Domain.Entities.UserEntity
@{
    ViewBag.Title = "ManageAvatar";
}
<script type="text/javascript">
    $(window).load(
    function () {
        $("#dvUpload").fileUpload({
            'uploader': '/Scripts/uploader.swf',
            'cancelImg': '/Content/Images/cancel.png',
            'buttonText': 'Browser Image',
            'script': '/Home/UploadUserAvatar',
            'onComplete': function (event, queueID, fileObj, response, data) {
                $("#Avatar").val(response);
            },
            'folder': '/UploadUserAvatar',
            'fileDesc': 'Image Files',
            'fileExt': '*.jpg',
            'multi': false,
            'auto': true
        });
    }
);
</script>
<h2>
    Update Avartar</h2>
@using (Html.BeginForm())
{
    <fieldset>
        <div class="editor-label">
            Avartar
        </div>
        <div id="dvUpload">
            @Html.Hidden("Avatar", ViewData["Avatar"])
        </div>
        <span class="urlControls">
            <input type="submit" value="Cập nhật" />
        </span>
    </fieldset>
}
